import { getKnowledge } from '../api/index';
import { message } from 'antd';

export default {
    namespace: "Date",
    state:{

    },
    //同步方法
    reducers:{


    },
    //异步方法
    effects:{
        //获取知识小册数据
        * getKnowledge({ payload }: any, { call, put }: any) {
        //获取接口数据
        let result: Response = yield call(getKnowledge, payload);
        yield put({
            type: "setKnowledge",
            payload: result
        })
        console.log(result);

    },
    }
}
